#include <iostream>
#include <memory>
#include <vector>
using namespace std;

class Foo
{
	public:
	Foo() { cout << "Foo()" << endl; }
	~Foo() { cout << "~Foo()" << endl; }
};

int main()
{
	const auto_ptr<Foo> p1( new Foo );
	auto_ptr<Foo> p2 = p1;

	cout << ( p1.get() ? "p1 != 0" : "p1 == 0" ) << endl;
	cout << ( p2.get() ? "p2 != 0" : "p2 == 0" ) << endl; 
	return 0;
}

